﻿@model asMeishi.web.Models.shop
@using asMeishi.web.Classes
@{
    ViewBag.Title = "p_googleMap";
    Layout = null;

    string xy;
    string markerTitle;
    
    if(Model.longitudeAndLatitude==null){
        xy = "";
        markerTitle = "请移动我，将" + Model.name + "指在它所在的合位置上";
    }else{
        xy = String.Join(",", Model.longitudeAndLatitude);
        markerTitle = Model.name;
    }
}

@*<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>*@
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>
<script type="text/javascript" src="/Content/script/myGoogleMap.js"></script>

<script>
    var asMeishiMap;
$(function () {
    //创建地图
    asMeishiMap = new asMeishiMapClass("baidu", "map_canvas", "@xy", "@baseConfig.siteThemePath");
    
}

    );

var showMapEdit = function () {
    $("#maptoolsbar_edit").show();
    if (asMeishiMap) {
        asMeishiMap.ableEdit();
    }
}
function hideMapEdit() {
    $("#maptoolsbar_edit").hide();
    asMeishiMap.disableEdit();
}
function mapFullScreen() {
    var xx = new actFloat(document.getElementById("bigMap_canvas"), "picUloadFloatPanle", "picUploadFloat",true);
    xx.loc().show();

    var asMeishiMapBig = new asMeishiMapClass("baidu", "bigMap_canvas", "@xy","@baseConfig.siteThemePath");
}
</script>

<div style="border:1px solid #e0e0e0; padding:1px;width:350px; height:220px; ">
    <div id="map_canvas" style="width:350px;height:220px"></div>
</div>

<div id="maptoolsbar" style="  text-align:right;margin-top:-25px; margin-right:10px; zoom:1; z-index:99; position:relative">

    <div id="maptoolsbar_other" style=" float:right; margin-left:10px;">
        
        <img id="resMapBtn" onclick="asMeishiMap.locDefault()" alt="回到原点" src="@(baseConfig.siteThemePath)images/map_go.png" title="回到原点" />
        <img onclick="mapFullScreen()" title="全屏" src="@(baseConfig.siteThemePath)images/arrow_out.png" title="全屏" />
    </div>

    <div id="maptoolsbar_edit" style="display:none;">
        <img id="saveMapBtn" onclick="asMeishiMap.save()" alt="保存" src="@(baseConfig.siteThemePath)images/map_edit.png" title="保存" />
        <img id="clearMapBtn" onclick="asMeishiMap.clearMark()" alt="清空" src="@(baseConfig.siteThemePath)images/map_delete.png" title="清空" />

    </div>
</div>

<div id="bigMap_canvas" style="border:2px solid #e0e0e0; padding:3px;width:1000px; height:600px; display:none; z-index:1001"></div>